/*
Author:		Nguyen Anh Thoai
Email:		nathoai@gmail.com
Phone:		0985 029 516
Create:		26/10/2012 08:00 AM
Update:		?
--------------------------------------------------------------------------------------
Use Master;

If Exists(Select * From SysDatabases Where Name = 'KTX_14')
	Drop Database KTX_14;

Create Database KTX_14
	Collate Vietnamese_Ci_Ai;

Use KTX_14;
*/
Set Dateformat Dmy
Go

Use KTX_14
Go

--------------------------------------------------------------------------------------
--> Thêm dữ liệu vào các bảng
--(01) Daynhas: Dãy nhà
Insert into Daynhas(Id,Soday,Tenday) Values ('511D2740-D08C-44CB-B5B8-BC4CF34D7978','A',N'Dãy A')
Insert into Daynhas(Id,Soday,Tenday) Values ('16D3C7A0-D2D6-4637-919A-E70D281C246F','B',N'Dãy B')
Insert into Daynhas(Id,Soday,Tenday) Values ('6298E82D-5962-4657-9EC1-17F849D7B5E8','C',N'Dãy C')
Insert into Daynhas(Id,Soday,Tenday) Values ('32450492-D416-4CF1-8248-AA8541BBCF38','D',N'Dãy D')
Insert into Daynhas(Id,Soday,Tenday) Values ('E5D83B36-30B2-476F-BD8B-234621BFBC37','E',N'Dãy E')
Go

--(02) Doituongs: Đối tượng
Insert into Doituongs(Id,MaDT,TenDT,Ghichu) Values ('8CE3CF5A-E6CE-4942-9E25-074440D357EF','01',N'Dân tộc', '')
Insert into Doituongs(Id,MaDT,TenDT,Ghichu) Values ('0A4F22EF-B00B-4B41-A100-13928C72E95F','02',N'Thương binh - Liệt sĩ', '')
Insert into Doituongs(Id,MaDT,TenDT,Ghichu) Values ('51235696-46BC-4374-AB13-992233629B1A','03',N'Vùng sâu, vùng xa, hộ nghèo', '')
Go

--(03) Khoas: Khoa
Insert into Khoas(Id,Makhoa,Tenkhoa) Values ('AC1AEE0B-2835-427A-9110-BB262C5CDE6A','01',N'Khoa CNTT - TT')
Insert into Khoas(Id,Makhoa,Tenkhoa) Values ('AD28EB3F-321F-403F-99D2-8F4159059F0D','02',N'Khoa Sư Phạm')
Insert into Khoas(Id,Makhoa,Tenkhoa) Values ('BE5516C3-0B30-488A-BF4F-C326360E8264','03',N'Khoa Công Nghệ')
Insert into Khoas(Id,Makhoa,Tenkhoa) Values ('BD8FD397-6999-4268-AB26-135B72AC5E6F','04',N'Khoa Kinh Tế')
Insert into Khoas(Id,Makhoa,Tenkhoa) Values ('D0C46B97-6C5C-47AA-88B1-439949EF2244','05',N'Khoa Luật')
Go

--(04)Lophocs: Lớp học
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('03F63761-032C-474B-8C62-06310BFA95B6','01',N'Tin học 1','2011-2012','AC1AEE0B-2835-427A-9110-BB262C5CDE6A')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('532B206C-07D7-43D3-97FD-82073A7D8D98','02',N'Tin học 2','2011-2012','AC1AEE0B-2835-427A-9110-BB262C5CDE6A')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('B7BFC5EA-C4EE-4A8E-B0A2-97B129129B31','03',N'Tin học 3','2011-2012','AC1AEE0B-2835-427A-9110-BB262C5CDE6A')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('8DA579F9-A48C-4035-B000-05FF252A7D4B','04',N'Sư Phạm Toán 1','2011-2012','AD28EB3F-321F-403F-99D2-8F4159059F0D')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('F90574C5-0F96-401C-BC11-DED4A7E3811C','05',N'Sư Phạm Toán 2','2011-2012','AD28EB3F-321F-403F-99D2-8F4159059F0D')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('21E093EB-A2DB-4035-8B1B-05909F34A5D5','06',N'Điện Tử','2011-2012','BE5516C3-0B30-488A-BF4F-C326360E8264')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('F828B5F6-AC08-4694-98CD-88D65A02C3B3','07',N'Kế Toán','2011-2012','BD8FD397-6999-4268-AB26-135B72AC5E6F')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('C76C5E0A-A782-4B7E-9DED-CADEAABCF834','08',N'Luật 1','2011-2012','D0C46B97-6C5C-47AA-88B1-439949EF2244')
Insert into Lophocs(Id,Malop,Tenlop,Nienkhoa,KhoaId) Values ('FF0E7ACE-E5BE-4A18-9AC2-1963E0390B4A','09',N'Luật 2','2011-2012','D0C46B97-6C5C-47AA-88B1-439949EF2244')
Go

--(05)Phongs: Phòng
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('F9348BD4-6C84-4729-825D-A9E76E7E4F84','01','10','1000000','511D2740-D08C-44CB-B5B8-BC4CF34D7978')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('7F20EB92-3709-410B-AD65-3639C2B87B74','02','10','900000','511D2740-D08C-44CB-B5B8-BC4CF34D7978')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('7DD7D770-31C5-4ED1-9532-023D72BA3E2A','03','10','1000000','511D2740-D08C-44CB-B5B8-BC4CF34D7978')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('DE9FA9CD-1066-4E11-B58D-B8A57E688A40','01','10','1100000','16D3C7A0-D2D6-4637-919A-E70D281C246F')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('F5C0F257-290C-4667-B5F7-09E2C77D8994','02','10','1100000','16D3C7A0-D2D6-4637-919A-E70D281C246F')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('4D59C9F3-64C6-44DC-AADD-20F446B3736E','03','10','1100000','16D3C7A0-D2D6-4637-919A-E70D281C246F')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('EBBE2325-C5A7-467A-9F9F-C2CAD1831EA8','04','10','900000','16D3C7A0-D2D6-4637-919A-E70D281C246F')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('116C8A0F-5CB2-4038-AD54-B611D38D43D4','01','10','900000','6298E82D-5962-4657-9EC1-17F849D7B5E8')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('2E340F6D-B756-47ED-AE92-DDF3928B7E16','02','10','900000','6298E82D-5962-4657-9EC1-17F849D7B5E8')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('AE017D06-E3D9-4988-B2C8-90E294B34B2E','03','10','1000000','6298E82D-5962-4657-9EC1-17F849D7B5E8')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('DD21EF9E-3BFE-4C09-9251-0B44DA3F2904','01','10','1000000','32450492-D416-4CF1-8248-AA8541BBCF38')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('E2BC8D99-6262-463F-8E91-53A6E075238E','02','10','1000000','32450492-D416-4CF1-8248-AA8541BBCF38')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('31830152-C4A3-4FFF-90D1-E698CA893213','03','10','1200000','32450492-D416-4CF1-8248-AA8541BBCF38')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('DDCA70FD-F1F7-42D5-8695-49F6114400D6','01','10','1200000','E5D83B36-30B2-476F-BD8B-234621BFBC37')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('5F923881-D570-4620-ABF9-FC454D83189E','02','10','1100000','E5D83B36-30B2-476F-BD8B-234621BFBC37')
Insert into Phongs(Id,Maphong,Succhua,Giatien,DaynhaId) Values ('2DD8ABC2-C7DC-4981-B094-B974BA4088AF','03','10','900000','E5D83B36-30B2-476F-BD8B-234621BFBC37')
Go

set dateformat dmy
--(06)Sinhviens: Sinh viên
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('E99AC98C-7A56-425E-8F70-E911C713976A','SV01',N'Nguyễn Văn An','22/12/1991','0',N'Tam Bình - Vĩnh Long','8CE3CF5A-E6CE-4942-9E25-074440D357EF','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('EEBF6377-1D27-40A3-AEC8-012C4585166A','SV02',N'Lê Hồng Mi','02/11/1992','1',N'Long Mỹ - Hậu Giang','51235696-46BC-4374-AB13-992233629B1A','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('366CDD9D-1C6F-4B5D-9616-D68BF96EC557','SV03',N'Trần Thị Chúc','14/08/1990','1',N'Càng Long - Trà Vinh','51235696-46BC-4374-AB13-992233629B1A','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('2E7F58A0-82ED-4C20-B8A1-7B6B7AB9CAFA','SV04',N'Nguyễn Văn Nam','12/08/1991','0',N'Rạch Giá - Kiên Giang','51235696-46BC-4374-AB13-992233629B1A','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('132184C7-788E-4CAB-BAFE-A10FE75B4CD6','SV05',N'Phan Văn Trị','18/03/1993','0',N'Tân Hiệp - Kiên Giang','0A4F22EF-B00B-4B41-A100-13928C72E95F','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('0789012C-9F8C-49C3-8E59-580A1934D708','SV06',N'Lý Thái Hòa','15/04/1994','0',N'Thạnh Trị - Sóc Trăng','0A4F22EF-B00B-4B41-A100-13928C72E95F','03F63761-032C-474B-8C62-06310BFA95B6')
Insert into Ktx_Sinhvien(Id,MaSV,Hoten,Ngaysinh,Gioitinh,Diachi,DoituongId,LophocId) Values ('B1AA5510-8920-4446-AAEE-1D10A16BF9B9','SV07',N'Nguyễn Thị Như','06/02/1989','1',N'Ô Môn - Cần Thơ','0A4F22EF-B00B-4B41-A100-13928C72E95F','03F63761-032C-474B-8C62-06310BFA95B6')
